import xlrd
wb=xlrd.open_workbook('count应用.xls')
ws=wb.sheet_by_name('等级')
m,n=0,0
for i in '优良中差':
    while n<ws.nrows-1:


        m+=ws.cell_value(n,1).count(i)
        n += 1
        print(m)
    m,n=0,0